package com.atguigu.upp.mapper;

import com.atguigu.upp.bean.TagInfo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Smexy on 2022/10/13
 */
public interface TagInfoMapper
{
    @Select("select * from tag_info where tag_task_id = #{taskId}")
    TagInfo getTagInfoByTaskId(Integer taskId);

    /*
            查询今天要计算的标签（标签名，标签计算结果值的类型）有哪些
     */
    @Select(" SELECT `tag_info`.*  FROM `tag_info` WHERE `tag_task_id` IN ( " +
        "SELECT id FROM `task_info`WHERE `task_status`='1' ) ")
    List<TagInfo> getTagInfoNameEnableToday();
}
